<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>InfluxDB - Admin Interface</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/dropdowns-enhancement.css" rel="stylesheet">
    <link href="css/admin.css" rel="stylesheet">

</head>

<body>
    <div id="wrap">
        <!-- Navigation -->
        <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
            <div class="container">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                    <a class="navbar-brand" href="#">
                        <img src="img/influxdb-light400.png" style="height:28px; margin-top:-4px;" />
                    </a>
                </div>
                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav">
                        <li>
                            <a href="#" data-toggle="modal" data-target="#myModal">Write Data</a>
                        </li>
                        <li>
                            <a href="https://docs.influxdata.com/influxdb/v0.10/introduction/getting_started" target="_blank">Documentation</a>
                        </li>
                    </ul>


                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span>Database:</span> <span id="content-current-database">&hellip;</span> <span class="caret"></span></a>
                            <ul class="dropdown-menu" id="content-database-list">
                                <!-- Available databases will go here -->
                            </ul>
                        </li>

                        <li>
                            <a href="#" id="action-settings"><i class="glyphicon glyphicon-cog"></i></a>
                        </li>
                    </ul>
                </div>
                <!-- /.navbar-collapse -->

            </div>
            <!-- /.container -->
        </nav>


        <!-- Page Content -->
        <div class="container">

            <!-- Settings Pane -->
            <div id="settings">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <h3 class="panel-title">Connection Settings</h3>
                    </div>
                    <div class="panel-body">
                        <form class="form-inline" id="form-settings">
                            <div class="form-group">
                                <label for="hostname">Host</label>
                                <input type="text" class="form-control" id="hostname" placeholder="localhost">
                            </div>

                            <div class="form-group">
                                <label for="port">Port</label>
                                <input type="text" class="form-control" id="port" placeholder="8086" />
                            </div>

                            <div class="form-group">
                                <label for="username">Username</label>
                                <input type="text" class="form-control" id="username" placeholder="">
                            </div>

                            <div class="form-group">
                                <label for="password">Password</label>
                                <input type="text" class="form-control" id="password" placeholder="">
                            </div>

                            <div class="checkbox form-group">
                                <label>
                                    <input type="checkbox" id="ssl"> SSL
                                </label>
                            </div>
                            <div class="form-group">
                                <button type="submit" class="btn btn-default">Save</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>

          <div id="queries"></div>
            <div class="row">
                <div class="col-sm-12" id="content">
                    <form id="query-form">
                        <div class="form-group">
                            <div class="input-group">
                                <label class="input-group-addon">Query: </label>
                                <input type="text" class="form-control" id="query" style="width:100%">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-12" id="content">
                    <div class="dropdown text-right" id="template-container">
                        <button class="btn btn-default dropdown-toggle" id="dropdown-templates" data-toggle="dropdown">Query Templates <span class="caret"></span> </button>
                        <ul class="dropdown-menu pull-right" id="action-template">
                          <li><label data-query="SHOW DATABASES">Show Databases</label></li>
                          <li><label data-query="CREATE DATABASE &quot;db_name&quot;">Create Database</label></li>
                          <li><label data-query="DROP DATABASE &quot;db_name&quot;">Drop Database</label></li>
                          <li class="divider"></li>
                          <li><label data-query="SHOW MEASUREMENTS">Show Measurements</label></li>
                          <li><label data-query="SHOW TAG KEYS FROM &quot;measurement_name&quot;">Show Tag Keys</label></li>
                          <li><label data-query="SHOW TAG VALUES FROM &quot;measurement_name&quot; WITH KEY = &quot;tag_key&quot;">Show Tag Values</label></li>
                          <li class="divider"></li>
                          <li><label data-query="SHOW RETENTION POLICIES ON &quot;db_name&quot;">Show Retention Policies</label></li>
                          <li><label data-query="CREATE RETENTION POLICY &quot;rp_name&quot; ON &quot;db_name&quot; DURATION 30d REPLICATION 1 DEFAULT">Create Retention Policy</label></li>
                          <li><label data-query="DROP RETENTION POLICY &quot;rp_name&quot; ON &quot;db_name&quot;">Drop Retention Policy</label></li>
                          <li class="divider"></li>
                          <li><label data-query="SHOW USERS">Show Users</label></li>
                          <li><label data-query="CREATE USER &quot;username&quot; WITH PASSWORD 'password'">Create User</label></li>
                          <li><label data-query="CREATE USER &quot;username&quot; WITH PASSWORD 'password' WITH ALL PRIVILEGES">Create Admin User</label></li>
                          <li><label data-query="DROP USER &quot;username&quot;">Drop User</label></li>
                          <li class="divider"></li>
                          <li><label data-query="SHOW STATS">Show Stats</label></li>
                          <li><label data-query="SHOW DIAGNOSTICS">Show Diagnostics</label></li>
                        </ul>
                    </div>
                </div>
            </div>

            <div class="row" id="query-alerts">
                <div class="col-sm-12">
                    <div class="alert alert-danger" id="query-error"></div>
                    <div class="alert alert-success" id="query-success"></div>
                    <div class="alert alert-warning" id="database-warning"></div>
                </div>
                <div class="col-sm-12" id="alert"></div>
            </div>

            <div class="row">
                <div class="col-sm-12" id="table"></div>
            </div>

            <div id="push"></div>
        </div>
    </div>

    <!-- /.container -->
    <div id="footer">
      <div class="container">
          <p class="text-muted text-right credit"><b>InfluxDB</b> Admin UI: <span class="influxdb-client-version"></span> Server: <span class="influxdb-version"></span></p>
      </div>
    </div>

    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">Write Data to InfluxDB</h4>
          </div>
          <div class="modal-body">
              <form>
                  <div class="form-group">
                      <textarea class="form-control" id="content-data"></textarea>
                  </div>
              </form>
              <div class="alert alert-danger" role="alert" id="modal-error"></div>
              <div class="alert alert-success" role="alert" id="modal-success"></div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            <button type="button" class="btn btn-primary" id="action-send">Send Data</button>
          </div>
        </div>
      </div>
    </div>

    <script src="js/vendor/react-0.13.3.min.js"></script>
    <script src="js/vendor/jquery-2.1.4.min.js"></script>
    <script src="js/vendor/bootstrap-3.3.5.min.js"></script>
    <script src="js/admin.js"></script>
</body>

</html>
